#define _CRT_SECURE_NO_WARNINGS 1

#include"tree.h"
#include"Queue.h"

Tnode* buynode(TreeTypedate x)
{
	Tnode* newnode = (Tnode*)malloc(sizeof(Tnode));
	assert(newnode);

	newnode->a = x;
	newnode->left = newnode->right = NULL;

	return newnode;
}
Tnode* creatTree()
{
	Tnode* node1 = buynode(1);
	Tnode* node2 = buynode(2);
	Tnode* node3 = buynode(3);
	Tnode* node4 = buynode(4);
	Tnode* node5 = buynode(5);
	Tnode* node6 = buynode(6);

	node1->left = node2;
	node1->right = node4;
	node2->left = node3;
	node4->left = node5;
	node4->right = node6;

	return node1;
}
int main()
{
	Tnode* root = creatTree();

	printf("%d\n", TreeHeight(root));
	printf("%d\n", TreeSize(root));
	printf("%d\n", LeafSsize(root));
	printf("%d\n", LevelSize(root, 3));
	levelOrdermax(root);

	return 0;
}